package ui.frame;

import tool.UIEventHandler;
import ui.model.*;

import javax.swing.*;
import java.awt.*;

public class HBaseFrame extends JPanel {
    public HBaseFrame()
    {
//        setTitle("HBaseFrame");
//        setBounds(400, 400, 1200, 800);
        setLayout(new BorderLayout(2,2));
        init();
//        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//        setVisible(true);
    }

    private void init()
    {
    }

    public void AddModel(Component j,String dir)
    {
        this.add(dir,j);
        revalidate();
    }

    public static void main(String[] args)
    {
        HBaseFrame hBaseViso = new HBaseFrame();
        UIEventHandler.getInstance().Check();
//        InsertModel insertModel = new InsertModel();
//        hBaseViso.AddModel(insertModel, Direction.EAST);
//        TableModel hScrollTable = new TableModel();
//        hBaseViso.AddModel(hScrollTable,Direction.CENTER);

        /**
         * 选课列表
         */
//        FilterClassModel filterClassModel = new FilterClassModel();
//        hBaseViso.AddModel(filterClassModel,Direction.EAST);
//        StudentListModel studentListModel = new StudentListModel();
//        hBaseViso.AddModel(studentListModel,Direction.WEST);
//        ElectiveModel electiveModel = new ElectiveModel();
//        hBaseViso.AddModel(electiveModel,Direction.CENTER);
    }

    public interface Direction
    {
        public static final String NORTH = "North";
        public static final String SOUTH = "South";
        public static final String EAST = "East";
        public static final String WEST = "West";
        public static final String CENTER= "Center";
    }
}
